{include file="{$element}system/header.inc.tpl"}
{if !empty($flashMessage)}
    {$flashMessage}
{/if}
<div class="portlet light">
    <div class="portlet-title">
        <div class="caption">
            <i class="fa fa-list-alt font-green-sharp"></i>
            <span class="caption-subject font-green-sharp bold uppercase">Listagem</span>
        </div>
        <div class="actions">
            <a href="/{$module}/{$controller}/create" class="btn btn-primary btn-circle tooltips" data-container="body" data-placement="top" data-original-title="Inserir novo Registro"><i class="fa fa-plus"></i><span class="hidden-480"> Novo Registro</span></a>
            <a href="/{$module}/{$controller}/create" class="btn btn-danger btn-circle tooltips"  id ="remove_all" data-container="body" data-placement="top" data-original-title="Inserir novo Registro" style="display: none"><i class="fa fa-minus"></i><span class="hidden-480"> Remover Selecionados</span></a>
        </div>
    </div>{*<div class="portlet">
    <div class="portlet-title">
        <div class="caption"><i class="fa fa-list-ul"></i>Listagem </div>
        <div class="actions">
            <a href="/{$module}/{$controller}/create" class="btn btn-primary tooltips" data-container="body" data-placement="top" data-original-title="Inserir novo Registro"><i class="fa fa-plus"></i><span class="hidden-480"> Novo Registro</span></a>
            <a href="/{$module}/{$controller}/create" class="btn btn-danger tooltips"  id ="remove_all" data-container="body" data-placement="top" data-original-title="Inserir novo Registro" style="display: none"><i class="fa fa-minus"></i><span class="hidden-480"> Remover Selecionados</span></a>
        </div>
    </div>*}
    <div class="portlet-body flip-scroll no-space">
        <div class="row">
            <div class="col-md-12 col-sm-12">
                <div class="pagination margin-left-10">
                    Página
                    <a href="/{$module}/{$controller}/{$action}/{$paginate['previous']}" class="btn btn-sm btn-default prev" title="Prev"><i class="fa fa-angle-left"></i></a>
                    <input type="text" class="pagination-panel-input form-control input-mini input-inline input-sm" maxlenght="5" style="text-align:center; margin: 0 5px;">
                    <a href="/{$module}/{$controller}/{$action}/{$paginate['next']}" class="btn btn-sm btn-default next" title="Next"><i class="fa fa-angle-right"></i></a>
                    de
                    <span class="">{$paginate['page_all']}</span>
                    | Vendo {$paginate['n_line_row']} registro | Encontrado no total {$paginate['all_row']} registros
                </div>
            </div>
        </div>
        <div class="table-container">
            <table class="table table-bordered table-hover flip-content no-margin-bottom" id="datatable_ajax">
                <thead class="flip-content">
                <tr role="row" class="heading">
                    <th width="2%"><input type="checkbox" id="chk_all" class="group-checkable tooltips" data-container="body" data-placement="top" data-original-title="Selecinar Varios"></th>
                    <th >Nome</th>
                    <th >Login</th>
                    <th width="5%">Status</th>
                    <th width="12%" class="text-center">Ação</th>
                </tr>
                </thead>
                <tbody>
                {foreach from=$usuarios item=usuario}
                    <tr>
                        <td><input type="checkbox" name="id[]" class="chk_row" value="{$usuario->id}"></td>
                        <td>{$usuario->name}</td>
                        <td>{$usuario->login}</td>
                        <td class="text-center">
                            {btnStatus value={$usuario->status}}
                        </td>
                        <td class="text-center">
                            <div class="btn-group btn-group-sm">
                                <a href="/{$module}/{$controller}/view/{$usuario->id}" class="btn btn-default btn-sm tooltips no-margin" data-container="body" data-placement="top" data-original-title="Visualizar Registro"><i class="fa fa-search"></i></a>
                                <a href="/{$module}/{$controller}/update/{$usuario->id}" class="btn btn-default btn-sm tooltips no-margin" data-container="body" data-placement="top" data-original-title="Editar Registro"><i class="fa fa-edit"></i></a>
                                <a href="javascript:;" class="btn btn-default btn-sm tooltips no-margin" data-container="body" data-placement="top" data-original-title="Excluir Registro"><i class="fa fa-trash-o"></i></a>
                            </div>
                        </td>
                    </tr>
                {/foreach}
                </tbody>
            </table>
        </div>
        <div class="row">
            <div class="col-md-12 col-sm-12">
                <div class="pagination margin-left-10">
                    Página
                    <a href="#" class="btn btn-sm btn-default prev" title="Prev"><i class="fa fa-angle-left"></i></a>
                    <input type="text" class="pagination-panel-input form-control input-mini input-inline input-sm" maxlenght="5" style="text-align:center; margin: 0 5px;">
                    <a href="#" class="btn btn-sm btn-default next" title="Next"><i class="fa fa-angle-right"></i></a>
                    de
                    <span class="">{$paginate['page_all']}</span>
                    | Vendo {$paginate['n_line_row']} registro | Encontrado no total {$paginate['all_row']} registros
                </div>
            </div>
            {*<div class="col-md-6 col-sm-12">
                <ul class="pagination pull-right">
                    <li>
                        <a href="#"><i class="fa fa-angle-left"></i></a>
                    </li>
                    {paginate value=$paginate options=[''] module=$module controller=$controller action=$action}
                    <li><input type="text" value="3" class="form-control col-md-1"/></li>
                    <li>
                        <a href="#"><i class="fa fa-angle-right"></i></a>
                    </li>
                </ul>
            </div>*}

        </div>
    </div>
</div>
{include file="{$element}system/footer.inc.tpl"}